<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<jsp:include page = "../../metadatos.jsp" flush = "True" />
<html>
    <head>
        <title>Administrador de Pedidos</title>
    </head>
    <body>
        <div class="wrapper">
            <header class="header">
                <img src="./resources/Logo.PNG" />
            </header><!-- .header-->
            <!-- .Navigation Menu -->
            <jsp:include page = "../../menuNavegacion.jsp" flush = "True" />
            <main class="content">
                <fieldset class="formee">
                    <legend>Clientes</legend>

                    <div class="grid-12-12">
                        <form method="post" action="./Clientes?action=nombreClienteFiltro">
                        <fieldset class="formee">
                            <legend>Filtro</legend>
                            <div class="grid-12-12">    
                                <label>Nombre de Cliente<em class="formee-req">*</em></label>
                                <input type="text" name="nombreClienteFiltro" onKeyup="this.value = txtalfanum(this.value)" value=""/>
                            </div>
                            <div class="grid-12-12">    
                                <input type="submit" value="filtrar" />
                            </div>
                        </fieldset>
                        </form>
                    </div>
                    <form class="formee">
                        <div class="grid-12-12">
                            <div class="formee-list">
                                <input type="button" value="nuevo cliente" onclick="location.href = './Clientes?action=nuevoCliente'"/>
                                <input type="button" value="selccion columnas" onclick="location.href = '#'"/>
                                <input type="button" value="imprimir" onclick="location.href = '#'"/>
                            </div>
                            <table class="bordered" width="100%">
                                <thead>
                                    <tr style="font-size:15px;">
                                        <!--<th><strong>ID</strong></th>-->
                                        <th><strong>NOMBRE </strong></th>
                                        <th><strong>CIUDAD</strong></th>
                                        <th><strong>ESTADO</strong></th>
                                        <th><strong>TEL.</strong></th>
                                        <th><strong>DOMICILIO</strong></th>
                                        <th><strong>C.P.</strong></th>
                                        <th><strong>COLONIA</strong></th>
                                        <th><strong>RFC</strong></th>
                                        <th><strong>% DESC. 1</strong></th>
                                        <th><strong>% DESC. 2</strong></th>
                                        <th><strong>% DESC. 3</strong></th>
                                        <th><strong>EDITAR </strong></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <c:forEach items="${clientesPrincipal.clientes}" var="c">
                                        <tr style="font-size:12px;">
                                           <!--<td ><c:out value="${c.id}"/></td>-->
                                            <td><c:out value="${c.nombreCliente}"/></td>
                                            <td><c:out value="${c.ciudad}"/></td>
                                            <td><c:out value="${c.estado}"/></td>
                                            <td><c:out value="${c.telefono}"/></td>
                                            <td><c:out value="${c.domicilio}"/></td>
                                            <td><c:out value="${c.codigoPostal}"/></td>
                                            <td><c:out value="${c.colonia}"/></td>
                                            <td><c:out value="${c.rfc}"/></td>
                                            <td><c:out value="${c.descuentoAsignadoUno}"/></td>
                                            <td><c:out value="${c.descuentoAsignadoDos}"/></td>
                                            <td><c:out value="${c.descuentoAsignadoTres}"/></td>
                                            <td>
                                                <div align="center">
                                                    <img src="./resources/editar.png" height="36" width="36"  
                                                         onclick="location.href = './Clientes?action=editaCliente&idCliente=<c:out value="${c.id}"/>'"/>
                                                </div>
                                            </td> 
                                        </tr>
                                    </c:forEach>
                                </tbody>
                            </table> 
                        </div>
                    </form>
                </fieldset>
            </main>
        </div>
    </body>
</html>
<jsp:include page = "../../pie.jsp" flush = "True" />
